<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: products_stock.php 11 2013-09-21 11:43:11Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 11 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 11:43:11 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

$products = $db->db_query_limit("SELECT p.products_id,
									p.products_quantity,
									p.products_model,
									pd.products_name
								FROM
									" . TABLE_PRODUCTS . " p,
									" . TABLE_PRODUCTS_DESCRIPTION . " pd
								WHERE
									pd.language_id = '" . $_SESSION['languages_id'] . "'
								AND
									pd.products_id = p.products_id
								ORDER BY
									products_quantity ASC", 10, true);

echo '	<table width="100%" class="dataTable">
			<tr>
				<td><b>Produkt</b></td>
				<td align="center"><b>Bestand</b></td>
			</tr>';
		while (!$products->EOF) {
			echo '<tr><td>'.$products->fields['products_name'].' <em>Art-Nr.: '.$products->fields['products_model'].'</em></td><td align="center">'.$products->fields['products_quantity'].'</td></tr>';
			$products->MoveNext();
		}
echo '</table>';
echo '	<table width="100%">
			<tr>
				<td width="50%"></td>
				<td align="right">
					<a class="button" href="'.href_link('price_change.php', getMenuID('price_change')).'">Bestände ändern</a>
				</td>
			</tr>
		</table>';
?>